//
//  UserTools.m
//  EZ Tracker
//
//  Created by FENGYL on 2017/1/6.
//  Copyright © 2017年 FENGYL. All rights reserved.
//

#import "UserTools.h"

@implementation UserTools

#pragma mark 时间戳转换时间
+ (NSString *)TimestampChangeTimestr:(NSString *)Timestamp
{
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateStyle:NSDateFormatterMediumStyle];
    [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
    [dateFormatter setDateFormat:@"YYYY/MM/dd HH:mm:ss"];
    
    NSLog(@"CurTimestamp =  %@",Timestamp);
    NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:[Timestamp doubleValue]];
    NSLog(@"Greenwich time  = %@",confromTimesp);
    NSString *confromTimespStr = [dateFormatter stringFromDate:confromTimesp];
    NSLog(@"CurTime =  %@",confromTimespStr);
    return confromTimespStr;
}

@end
